<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->



{if $full_page}

{include file="pageheader.htm"}

{insert_scripts files="../js/utils.js,listtable.js"}

<div class="form-div">

  <form action="javascript:searchlist()" name="searchForm">

    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />

    商家 

    

    <select name="suppliers_id"  id="suppliers_id">

    	<option value="">请选择</option>
        <option value="0">自营店</option>
        {foreach from=$suppliers_list item=suppliers}
        <option value="{$suppliers.suppliers_id}">{$suppliers.suppliers_name}</option>
        {/foreach}
    </select>

    

     <input type="submit" value="{$lang.button_search}" class="button" />

  </form>

</div>

<!-- start bonus_type list -->

<form method="post" action="" name="listForm">

<div class="list-div" id="listDiv">

{/if}



  <table cellpadding="3" cellspacing="1">

    <tr>

      <th><a href="javascript:listTable.sort('type_name'); ">{$lang.type_name}</a>{$sort_type_name}</th>

      <th>商家</th>

      <th><a href="javascript:listTable.sort('send_type'); ">{$lang.send_type}</a>{$sort_send_type}</th>

      <th><a href="javascript:listTable.sort('type_money'); ">{$lang.type_money}</a>{$sort_type_money}</th>

      <th><a href="javascript:listTable.sort('min_amount'); ">{$lang.min_amount}</a>{$sort_min_amount}</th>

      <th>{$lang.send_count}</th>

      <th>{$lang.use_count}</th>

      <th>{$lang.handler}</th>

    </tr>

    {foreach from=$type_list item=type}

    <tr>

      <td align="center" class="first-cell"><span onclick="listTable.edit(this, 'edit_type_name', {$type.type_id})">{$type.type_name|escape:html}</span></td>

      <td align="center" class="first-cell">{if $type.suppliers_id eq 0}自营{else}{$type.suppliers_name}{/if}</td>

      <td align="center">{$type.send_by}</td>

      <td align="center"><span onclick="listTable.edit(this, 'edit_type_money', {$type.type_id})">{$type.type_money}</span></td>

      <td align="center"><span onclick="listTable.edit(this, 'edit_min_amount', {$type.type_id})">{$type.min_amount}</span></td>

      <td align="center"><span>{$type.send_count}</span></td>

      <td align="center">{$type.use_count}</td>

      <td align="center">

        {if $type.send_type eq 3}

        <a href="bonus.php?act=gen_excel&tid={$type.type_id}">{$lang.report_form}</a> |

        {/if}

        {if $type.send_type neq 2}

        <a href="bonus.php?act=send&amp;id={$type.type_id}&amp;send_by={$type.send_type}&suppliers_id={$type.suppliers_id}">{$lang.send}</a> |

        {/if}

        <a href="bonus.php?act=bonus_list&amp;bonus_type={$type.type_id}">{$lang.view}</a> |

        <a href="bonus.php?act=edit&amp;type_id={$type.type_id}">{$lang.edit}</a> |

        <a href="javascript:;" onclick="listTable.remove({$type.type_id}, '{$lang.drop_confirm}')">{$lang.remove}</a></span></td>

    </tr>

      {foreachelse}

    <tr><td class="no-records" colspan="11">{$lang.no_records}</td></tr>

      {/foreach}

    <tr>

      <td align="right" nowrap="true" colspan="9">{include file="page.htm"}</td>

    </tr>

  </table>



{if $full_page}

</div>

</form>

<!-- end bonus_type list -->



<script type="text/javascript" language="JavaScript">

<!--

  listTable.recordCount = {$record_count};

  listTable.pageCount = {$page_count};



  {foreach from=$filter item=item key=key}

  listTable.filter.{$key} = '{$item}';

  {/foreach}



  {literal}

  onload = function()

  {

     // 开始检查订单

     startCheckOrder();

  }

  {/literal}

  

 function searchlist()

  {

      var suppliers_id = document.forms['searchForm'].elements['suppliers_id'].value;

      listTable.filter['suppliers_id'] = suppliers_id;

      listTable.filter['page'] = 1;

	  listTable.loadList();

  }

//-->

</script>

{include file="pagefooter.htm"}

{/if}